package com.group.elmboot.po;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class RedPacket {
    int id;
    String userId;
    int amount;
    boolean used;
    LocalDateTime createTime;
    int orderId;

    public RedPacket(String userId, int amount, LocalDateTime createTime) {
        this.userId = userId;
        this.amount = amount;
        this.used = false;
        this.createTime = createTime;
    }

    public RedPacket(int id,String userId, int amount,int orderId){
        this.id=id;
        this.used=true;
        this.userId = userId;
        this.amount = amount;
        this.orderId=orderId;
    }

}
